package GO_BACK;

public class Gun {
    private String model;
    private int damage;
    private static int bulletCount = 0;

    public Gun(String model, int damage, int bulletCount) {
        this.model = model;
        this.damage = damage;
        this.bulletCount = bulletCount;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public int getDamage() {
        return damage;
    }

    public void setDamage(int damage) {
        this.damage = damage;
    }

    public int getBulletCount() {
        return bulletCount;
    }

    public void setBulletCount(int bulletCount) {
        this.bulletCount = bulletCount;
    }
    public void addBullets(int add){
        bulletCount = add;
        System.out.println("弹夹里有"+bulletCount+"颗子弹");
    }
    public void shoot(){
        System.out.println("biubiubiu,dadadada射击完成");
        bulletCount = 0;
        System.out.println("弹夹清空");
    }
}
